<!doctype html>
<html>
    <head>
        <title>住院详细信息</title>
        <meta http-equiv="Content-type" content="text/html; charset=utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <link rel="stylesheet" type="text/css" href="../../css/jquery.mobile-1.4.0.css" />
        <link rel="stylesheet" type="text/css" href="../../css/zpdydhl_mobile.css">
        <link rel="stylesheet" type="text/css" href="../../css/mobiscroll.custom-2.6.2.min.css">
        <script type="text/javascript" src="../../js/jquery-1.8.3.min.js"></script>
        <script type="text/javascript" src="../../js/jquery.mobile-1.4.0.min.js"></script>
        <script type="text/javascript" src="../../js/zpdydhl_mobile.js"></script>
        <script type="text/javascript" src="../../js/mobiscroll.custom-2.6.2.min.js"></script>
    </head>
    <body>
        <div data-role="page" data-theme="c">

            <div class="ui-content" style="padding:0px;" role="main">
            <div class="bingli_content_jichu_info" id="patient_info_basic">
            </div>
            <div class="bingli_content_jichu_info" id="patient_zhuyaun_info">
            </div>
            <div class="bingli_content_jichu_info" id="patient_huli_jibie">
            </div>
            <div class="bingli_content_jichu_info" id="patient_zeren_yishi">
            </div>
            <div class="bingli_content_jichu_info" id="patient_zeren_hushi">
            </div>
            <div class="bingli_content_jichu_info" id="bingli_zhenduan">
            </div>
            <div class="bingli_content_jichu_info" id="bingli_yiliaofukuanfangshi">
            </div>
            <div class="bingli_content_jichu_info" id="bingli_zhusu">
            </div>
            <!-- <div class="bingli_content_jichu_info" id="bingli_bingchengjilu">
            </div> -->
			
            <div class="ui-grid-solo bingli_content_shoushu">
                <div class="ui-block-a">
                    入院记录
                </div>
            </div>
            <div id="ruyuan_jilu_list">
            </div>
            <!-- <div class="ui-grid-solo bingli_content_shoushu">
                <div class="ui-block-a">
                    首次病程记录
                </div>
            </div>
            <div id="shouci_bingcheng_jilu_list">
            </div>
            <div class="ui-grid-solo bingli_content_shoushu">
                <div class="ui-block-a">
                    病程记录
                </div>
            </div>
            <div id="bingchengjilu_list">
            </div>
			 -->
        </div>
		
		
        <!-- <div data-role="footer" data-position="fixed" class="footer_list"  data-tap-toggle="false" data-theme="b">
            <ul>
                <li><a href="./showPatientZhuyuanDetail.html" data-ajax="false"><img src="../../css/images/bl_hover.png"></a></li>
                <li><a href="./showPatientZhenduan.html" data-ajax="false"><img src="../../css/images/jy.png"></a></li>
                <li><a  href="./showYizhuChangqi.html" data-ajax="false"><img src="../../css/images/yz.png"></a></li>
                <li><a href="./showTizhengList.html" data-ajax="false"><img src="../../css/images/tz.png"></a></li>
                <li><a href="../JianyanJiancha/showJianchaList.html" data-ajax="false"><img src="../../css/images/jc.png"></a></li>
            </ul>
        </div> -->
		
    </div>
    <script type="text/javascript">
        $(function(){
			//setHeader();
            //设置改页面的值，用于判断当点击患者列表后，响应页面操作
            document_type_global = "zhuyuanDetail";
            $(".hlink").die().live("click",function(){
                var hlink = $(this).attr("hlink");
                bingcheng_jilu_id = $(this).attr("jilu_id");
                window.location.href = hlink+"?bingcheng_jilu_id="+bingcheng_jilu_id;
            });
        });
		function refreshData()
		{
			 zhuyaunDetailSwitchuser();
		}
        //住院详细信息
        function zhuyaunDetailSwitchuser(){
			setHeader();
            $("#patient_info_basic").html(patient_info_global.xingming+"&nbsp"+patient_info_global.xingbie+"&nbsp"+patient_info_global.nianling+"&nbsp&nbsp"+patient_info_global.zhuyuan_id);
            $("#patient_zhuyaun_info").html("<b> 床号：</b>"+patient_info_global.bingchuang_hao+"床");
            $.ajax({
                type: "get",
                async: true,
                url:server_url+"Mobile/Patient/showPatientZhuyuanDetailJson/zhuyuan_id/"+patient_info_global.zhuyuan_id+"/patient_id/"+patient_info_global.patient_id+yiyuan_id,
                data:{user_number:nurse_info_global.user_number},
                dataType: "jsonp",
                jsonp: "callbackShowPatientZhuyuanDetailJson",
                jsonpCallback:"feedBackStateShowPatientZhuyuanDetailJson",
                error:function(mes)
                {
                  alert("请求失败，请稍后重试");
                },
                success: function(result) {
                  if(result.ret="success"){
					if(result.data.ruyuan_zhenduan !== null && typeof(result.data.ruyuan_zhenduan) !== "undefined" && result.data.ruyuan_zhenduan !== "" )
						$("#bingli_zhenduan").html("<b>诊断：</b>"+result.data.ruyuan_zhenduan);
					else
						$("#bingli_zhenduan").remove();
					if(result.data.yiliaofukuanfangshi !== null && typeof(result.data.yiliaofukuanfangshi) !== "undefined" && result.data.yiliaofukuanfangshi !== "")
						$("#bingli_yiliaofukuanfangshi").html("<b>医保类型：</b>"+result.data.yiliaofukuanfangshi);
					else
						$("#bingli_yiliaofukuanfangshi").remove();
					if(result.data.zhusu !== null && typeof(result.data.zhusu) !== "undefined" && result.data.zhusu !== "")
						$("#bingli_zhusu").html("<b>主诉：</b>"+result.data.zhusu);
					else
						$("#bingli_zhusu").remove();
					if(result.data.hulijibie !== null && typeof(result.data.hulijibie) !== "undefined" && result.data.hulijibie !== "")
						$("#patient_huli_jibie").html("<b> 护理级别：</b>"+result.data.hulijibie);
					else
						$("#patient_huli_jibie").remove();
					if(result.data.zhuzhenyishi !== null && typeof(result.data.zhuzhenyishi) !== "undefined" && result.data.zhuzhenyishi !== "")
						$("#patient_zeren_yishi").html("<b> 责任医师：</b>"+result.data.zhuzhenyishi);
					else
						$("#patient_zeren_yishi").remove();
					if(result.data.zerenhushi !== null && typeof(result.data.zerenhushi) !== "undefined" && result.data.zerenhushi !== "")
						$("#patient_zeren_hushi").html("<b> 责任护士：</b>"+result.data.zerenhushi);
					else
						$("#patient_zeren_hushi").remove();
					if(result.data.zhuyuan_bingcheng !== null && typeof(result.data.zhuyuan_bingcheng) !== "undefined" && result.data.zhuyuan_bingcheng !== "")
						$("#bingli_bingchengjilu").html("<b> 病程记录：</b>"+result.data.bingchengjilu);
					else
						$("#bingli_bingchengjilu").remove();
					
                    ruyuan_jilu = result.data.ruyuanjilu_data;
                    str = "";
                    for (var i = 0; i < ruyuan_jilu.length; i++ ){
                      str+='<a href="#" hlink="showRuyuanjilu.html" data-ajax="false" style="font-weight:200;" class="hlink"><div class="ui-grid-a bingli_content_shoushu_all"><div class="ui-block-a" style=" width:100px;text-align:left; text-indent:20px;">入院记录</div><div class="ui-block-b" style="width:190px;">(&nbsp;'+ruyuan_jilu[i].ruyuan_riqi_time+'&nbsp;)</div></div></a>';
                    };
                    $("#ruyuan_jilu_list").html(str);

                    shouci_bingcheng_jilu = result.data.zhuyuan_bingchengjilushouci;
                    str = "";
                    for (var i = 0; i < shouci_bingcheng_jilu.length; i++ ){
                      str+='<a href="#" hlink="showShouciBingcheng.html" data-ajax="false" style="font-weight:200;" jilu_id="'+shouci_bingcheng_jilu[i].id+'" class="hlink"><div class="ui-grid-a bingli_content_shoushu_all"><div class="ui-block-a" style="width:100px;text-align:left; text-indent:20px;">首次病程记录</div><div class="ui-block-b" style="width:190px;">(&nbsp;'+shouci_bingcheng_jilu[i].record_time+'&nbsp;)</div></div></a>';
                    };
                    $("#shouci_bingcheng_jilu_list").html(str);

                    zhuyaun_bingcheng_jilu = result.data.zhuyuan_bingcheng;
                    str = "";
                    for (var i = 0; i < zhuyaun_bingcheng_jilu.length; i++ ){
                      str+='<a href="#" hlink="showBingchengJilu.html" data-ajax="false" style="font-weight:200;" jilu_id="'+zhuyaun_bingcheng_jilu[i].id+'" class="hlink"><div class="ui-grid-a bingli_content_shoushu_all"><div class="ui-block-a" style="width:100px;text-align:left; text-indent:20px;">';
                      if(zhuyaun_bingcheng_jilu[i].bingcheng_sub_leibie == ''){
                        str+="查房记录";
                      }else{
                        str+=zhuyaun_bingcheng_jilu[i].bingcheng_sub_leibie;
                      }
                      str+='</div><div class="ui-block-b" style="width:190px;">(&nbsp;'+zhuyaun_bingcheng_jilu[i].record_time+'&nbsp;)</div></div></a>'
                    };
                    $("#bingchengjilu_list").html(str);
					
                  }
                }
            });
        }

    </script>
                                                                                            
</body>
</html>
